﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Shove.Web.UI;

public partial class UserControls_ArticleMenu : UCBase 
{
    public UserControls_ArticleMenu()
    {
        Name = "文章列表菜单";

        swpas = new ShoveWebPartAttribute[13];

        swpas[0] = new ShoveWebPartAttribute_Int("控件宽度", "1,1000", 180, "控件宽度");
        swpas[1] = new ShoveWebPartAttribute_Int("导航高度", "1,300", 28, "导航高度");
        swpas[2] = new ShoveWebPartAttribute_Int("导航背景图片单元格宽度", "1,600", 106, "导航背景图片单元格宽度");
        swpas[3] = new ShoveWebPartAttribute_Int("常见问题行宽度", "1,1000", 170, "常见问题行宽度");
        swpas[4] = new ShoveWebPartAttribute_Int("常见问题单元格宽度", "1,600", 160, "常见问题单元格宽度");

        swpas[5] = new ShoveWebPartAttribute_Text("导航字体CSS样式", "", "title14_bai", "导航字体CSS样式");
        swpas[6] = new ShoveWebPartAttribute_Text("常见问题CSS样式", "", "black12", "常见问题CSS样式");

        swpas[7] = new ShoveWebPartAttribute_Image("导航背景图片1", "", "images/title_bg_1.jpg", "导航背景图片1");
        swpas[8] = new ShoveWebPartAttribute_Image("导航背景图片2", "", "images/title_bg_hui.jpg", "导航背景图片2");
        swpas[9] = new ShoveWebPartAttribute_Image("分割线图片", "", "images/category_bg_2.jpg", "分割线图片");
        swpas[10] = new ShoveWebPartAttribute_Image("标题前小图片", "", "images/point_bg.jpg", "标题前小图片");

        swpas[11] = new ShoveWebPartAttribute_Color("控件边框颜色", "#cccccc", "控件边框颜色");

        swpas[12] = new ShoveWebPartAttribute_Int("常见问题行高", "1,400", 26, "常见问题行高");
    }

    private void Initlayout()
    {
        tabctr.Width = swpAttributes[0];
        tabctr.BgColor = swpAttributes[11];

        tdhelp.Height = swpAttributes[1];
        tdhelp.Attributes.Add("class", swpAttributes[5]);
        tdhelp.Style.Add("background-image", "url('" + swpAttributes[7] + "')");
        tdhelp.Width = swpAttributes[2];

        tdspace.Style.Add("background-image", "url('" + swpAttributes[8] + "')");
        tdspace.Width = (Shove._Convert.StrToInt(swpAttributes[0], 180) - Shove._Convert.StrToInt(swpAttributes[2], 106)).ToString();

        tab1.Width = swpAttributes[3];
        tab1.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        imgpoint.Src = "~/" + swpAttributes[10];
        tdquest.Height = swpAttributes[12];
        tdquest.Attributes.Add("class", swpAttributes[6]);
        tdquest.Width = swpAttributes[4];

        tab2.Width = swpAttributes[3];
        tab2.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        imgpoint1.Src = "~/" + swpAttributes[10];
        tdzhinan.Height = swpAttributes[12];
        tdzhinan.Attributes.Add("class", swpAttributes[6]);
        tdzhinan.Width = swpAttributes[4];

        tab3.Width = swpAttributes[3];
        tab3.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        imgpoint2.Src = "~/" + swpAttributes[10];
        tdhelpUs.Height = swpAttributes[12];
        tdhelpUs.Attributes.Add("class", swpAttributes[6]);
        tdhelpUs.Width = swpAttributes[4];

        tab4.Width = swpAttributes[3];
        tab4.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        imgpoint4.Src = "~/" + swpAttributes[10];
        tdpay.Height = swpAttributes[12];
        tdpay.Attributes.Add("class", swpAttributes[6]);
        tdpay.Width = swpAttributes[4];

        tab0.Width = swpAttributes[3];
        tab0.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        imgpoint0.Src = "~/" + swpAttributes[10];
        tdNotices.Height = swpAttributes[12];
        tdNotices.Attributes.Add("class", swpAttributes[6]);
        tdNotices.Width = swpAttributes[4];
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        Initlayout();
    }
}
